package com.student.education.service;

import com.student.education.common.CommonPage;
import com.student.education.entity.Clazz;
import com.student.education.entity.User;
import com.student.education.entity.UserDownload;
import com.student.education.to.ConsumptionQueryTo;
import com.student.education.to.UserTo;
import com.student.education.vo.ConsumptionVo;
import com.student.education.vo.MyStudentVo;
import com.student.education.vo.UserQueryVo;
import com.student.education.vo.UserVo;

import java.util.List;

/**
 * 用户表(User)表服务接口
 *
 * @author makejava
 * @since 2021-09-14 16:25:52
 */public interface UserService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    UserTo queryById(Integer id);

    /**
     * 新增数据
     *
     * @param user 实例对象
     * @return 实例对象
     */
    int insert(User user);

    /**
     * 修改数据
     *
     * @param user 实例对象
     * @return 实例对象
     */
    UserTo update(User user);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Integer id);

    UserTo queryByLogin(UserVo vo);

    int updateMyInfo(User vo);

    CommonPage<UserTo> queryAll(UserQueryVo vo);

    int delete(List<Integer> ids);

    CommonPage<UserTo> queryMyStudents(MyStudentVo vo);

    List<Clazz> queryMyClass(Integer id);

    int insertDD(List<UserDownload> list);
}